.tab {
    width: 600px;
    height: 440px;
    background: #eee;
    margin-left: auto;
    margin-right: auto;
}

.tab-nav {
    height: 40px;
    background: #333;
    color: #fff;
    text-align: center;
    line-height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tab-nav li {
    flex: 1;
    cursor: pointer;
}

.tab-nav li.active {
    background: rgb(132, 27, 1);
}

.tab-content .tab-item {
    width: 100%;
    height: 400px;
    display: none;
    /* 隐藏新闻内容 */
}

.tab-content .tab-item.active {
    display: block;
    /* 显示当前内容 */
}